<div id="{{elem_id}}" class="ztree"></div>
<input type="hidden" id="{{elem_id}}_taxonomy" value="{{taxonomy}}"/>
<!-- Modal -->
<div class="modal fade" id="{{elem_id}}_edit_modal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title"><span id="{{elem_id}}_edit_dialog_action_name"></span> {{title}}</h4>
            </div>
            <div class="modal-body">
                <form id="{{elem_id}}_form">
                    <div class="form-group">
                        <label for="{{elem_id}}_tt_name">名称</label>
                        <input type="text" class="form-control" id="{{elem_id}}_tt_name" name="name"
                               placeholder="名称" required="" data-parsley-minlength-message="必填">
                    </div>
                    <div class="form-group">
                        <label for="{{elem_id}}_tt_slug">英文名称</label>
                        <input type="text" class="form-control" name="slug" id="{{elem_id}}_tt_slug" placeholder="英文名称"
                               value="" required="">
                    </div>
                    <div class="form-group">
                        <label for="{{elem_id}}_tt_description">描述</label>
                        <textarea class="form-control" name="description" id="{{elem_id}}_tt_description"
                                  placeholder="描述"></textarea>
                    </div>
                    <div class="form-group">
                        <label for="{{elem_id}}_tt_position">排序</label>
                        <input type="number" class="form-control" name="position" id="{{elem_id}}_tt_position"
                               placeholder="0" value="0" required="">
                    </div>
                    <input name="term_taxonomy_id" id="{{elem_id}}_term_taxonomy_id" value="" type="hidden"/>
                    <input name="parent_id" id="{{elem_id}}_parent_id" value="" type="hidden"/>
                    <input name="taxonomy"  value="{{taxonomy}}" type="hidden"/>
                    <input name="action" id="{{elem_id}}_save_action" value="create" type="hidden"/>
                    {% module xsrf_form_html() %}
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="{{elem_id}}_edit_dialog_save_btn">保存</button>
            </div>
        </div>
    </div>
</div>